package com.neu.chenzhiping.Service;

import com.neu.chenzhiping.Dao.dorDao;
import com.neu.commons.Utils.Cover;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class dorService {

    private dorDao r=null;
    public dorService(){
        r=new dorDao();
    }
    public int insert(Map<String,String> map) {
        int row=0;
       row =r.adddor(map);

        return row;
    }

    public List<Map<String,Object>> findSingle(Map<String, String> param) {

        List<Map<String,Object>>list=new ArrayList<>();
      list=  r.find(param);
        return list;
    }

    public int delete(Map<String,String[]> map) {
        int row=0;
        Map<String,String>param=Cover.CoverToMap(map);
        dorDao d=new dorDao();
        row=d.delete(param);
        return row;

    }

//    public List<Map<String,Object>> CheckAll() {
//        List<Map<String,Object>>list=new ArrayList<>();
//        list=r.checkdor();
//        return list;
//    }
}
